package org.spring.cloud.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value="${spring.application.name}")
//@FeignClient(value="user-server-dev")
public interface GenerateOrderService {

	/**
	 * 生成订单号
	 * @param prefix 前缀
	 * @param length 订单长度
	 * @return
	 */
	@GetMapping(value="/generateOrder",produces={"application/json; charset=UTF-8"})
	String generateOrder(@RequestParam("prefix") String prefix,@RequestParam(name="length",defaultValue="11") Integer length);
}
